home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 38 / 038.d81 / ragtime jukebox (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  4KB  |  157 lines

  1. 0 tp$="":sys65418:poke54296,.
  2. 1 poke53281,1:poke53280,6
  3. 2 ifx=0thenx=1:print"[147][144]"spc(10)"[212]uning the piano...":load"sid.obj",8,1
  4. 3 ifx=1thenx=2:load"input any.o",8,1
  5. 4 sa=780:sx=781:sy=782
  6. 5 poke53280,6:poke53281,1
  7. 6 s$="                                      "
  8. 7 td$=""
  9. 10 print"[147]"
  10. 20 print"         [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  11. 30 print"         [221][204]oadstar presents[221][155] "
  12. 40 print"         [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][155] "
  13. 50 print"                             "
  14. 60 print:print
  15. 70 gosub8000
  16. 180 print
  17. 190 print"         [154][160]    ([195]) 1987"
  18. 200 print"[154][160]"
  19. 210 print"[160]         [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  20. 220 print"[154][160]         [221] [208][210][197][211][211] [193][206][217] [203][197][217] [221][155] "
  21. 230 print"          [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][155][160]"
  22. 240 print"                            "
  23. 250 print"";
  24. 260 poke198,0:wait198,1:poke198,0:jo=56320
  25. 270 ns=6:dimf$(ns),r$(ns),t$(30):di=int(ns/2)
  26. 272 sp=1
  27. 280 forx=1tons:readf$(x),r$(x):next
  28. 290 :
  29. 291 data "[194]lack/[215]hite",black white.mus
  30. 293 data "[195]leopha",cleopha.mus
  31. 294 data "[197]xcelsior",excelsior.mus
  32. 295 data "[208]alm [204]eaf [210]ag",palm leaf.mus
  33. 296 data "[210]osebud",rosebud.mus
  34. 298 data "[198]avorite [210]ag",favorite.mus
  35. 300 print"[147]"
  36. 302 gosub8000
  37. 330 :
  38. 340 print"  [213]se [195]ursor keys or [202]oystick to move"
  39. 342 print"  the highlight to the song you want."
  40. 344 print"    [208]ress [[210][197][212][213][210][206]] or [198]irebutton to"
  41. 346 print"     select the highlighted tune."
  42. 348 print"[144]         [[208]ress '\' to exit]"
  43. 350 :
  44. 400 gosub1000: rem plot titles
  45. 410 gosub2000: rem get key
  46. 420 ifsp=ns+1then3000: rem play all
  47. 430 gosub4000: rem play tune at sp
  48. 440 goto300
  49. 450 :
  50. 1000 rem plot titles
  51. 1005 print""
  52. 1010 forx=1todi
  53. 1020 print"[146] ";:ifx=spthenprint"[154]";
  54. 1030 printf$(x);
  55. 1040 print"[146]";:ifx+di=spthenprint"[154]";
  56. 1050 printspc(21-len(f$(x)))f$(x+di)
  57. 1060 next
  58. 1070 print"[146]";:ifsp=ns+1thenprint"[154]";
  59. 1080 printspc(14)"[208][204][193][217] [193][204][204]"
  60. 1090 return
  61. 1094 :
  62. 2000 rem get key
  63. 2005 k=peek(198):j=peek(jo)
  64. 2010 ifk=0andj=127then2005
  65. 2020 getk$
  66. 2025 ifk$=chr$(13)orj=111then2100
  67. 2030 ifk$=""orj=125thensp=sp+1
  68. 2040 ifk$="[145]"orj=126thensp=sp-1
  69. 2045 ifk$=""orj=119thensp=sp+di
  70. 2050 ifk$="[157]"orj=123thensp=sp-di
  71. 2055 ifk$="\"then5000 : rem quit
  72. 2060 ifsp<1thensp=1
  73. 2070 ifsp>ns+1thensp=ns+1
  74. 2080 gosub1000:goto2005
  75. 2090 :
  76. 2100 return
  77. 2110 :
  78. 3000 rem play all
  79. 3005 sp=1
  80. 3020 f$=r$(sp):gosub6000
  81. 3030 gosub7000
  82. 3040 iffl=0thensp=sp+1:ifsp<=nsthen3020
  83. 3050 goto300
  84. 3060 :
  85. 4000 rem play song sp
  86. 4010 f$=r$(sp)
  87. 4020 gosub 6000
  88. 4030 gosub 7000
  89. 4040 goto300
  90. 4050 :
  91. 5000 rem quit
  92. 5010 print"[147]":gosub 8000
  93. 5020 print"  [144][193]re you sure you want to quit [[217]/[206]]?"
  94. 5022 poke198,0:wait198,1:getag$
  95. 5024 ifag$="y"orag$="[217]"then60000
  96. 5026 ifag$="n"orag$="[206]"then300
  97. 5028 goto5022
  98. 6000 pokesa,1:pokesx,8:pokesy,0:sys65466
  99. 6008 for k=1 to len(f$):poke 584+k,asc(mid$(f$,k)):next
  100. 6010 poke sa,len(f$):poke sx,73:poke sy,2:sys 65469
  101. 6012 pokesa,0:pokesx,0:pokesy,32:sys65493
  102. 6014 f$="t."+r$(sp):open2,8,2,f$:get#2,a$,b$:input#2,nl
  103. 6016 forx=1tonl:sys828,2,38:t$(x)=tp$+"":next:close2
  104. 6018 return
  105. 6020 :
  106. 7000 rem play it
  107. 7002 print"[147]":gosub8000:gosub9000
  108. 7010 sys49435:pokesx,0:pokesy,32:sys49458:poke49152,7
  109. 7020 ifpeek(198)=0and((peek(49152)and7)=7)andpeek(jo)=127then7020
  110. 7021 if(peek(jo)and16)=.thenfl=1:goto7030
  111. 7022 fl=0:if(peek(49152)and7)<>7then7030
  112. 7025 gc=0:getag$:gc=1:j=peek(jo):gosub10000
  113. 7028 iffl=1then7030
  114. 7029 goto7020
  115. 7030 poke49152,0
  116. 7040 poke54276,0:poke54283,0
  117. 7050 poke54290,0:sys49629
  118. 7060 return
  119. 7070 :
  120. 8000 rem boxer
  121. 8004 print"    [154]                              "
  122. 8006 print"                              [154]    [155] "
  123. 8008 print"    [154]        [210]agtime [202]ukebox    [154]   [155] "
  124. 8010 print"    [154]   [160]                      [160][154][160]  [155] "
  125. 8012 print"    [154]   [160]                       [154]   [155] "
  126. 8014 print"    [154]                              [155] "
  127. 8016 print"    [154]          [193]ll music           [155] "
  128. 8018 print"    [154]  transcribed by [202]ohn [210]oache  [155] "
  129. 8020 print"    [154]                              [155] "
  130. 8022 print"                                   "
  131. 8024 return
  132. 9000 print"     [144][195]ursor keys or joystick scroll"
  133. 9001 print"    [208]ress [\] or [198][201][210][197][194][213][212][212][207][206] to exit."
  134. 9002 print"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
  135. 9003 fori=1to6:print"[221]";spc(38)"[221]";:next
  136. 9004 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]";
  137. 9006 print"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
  138. 9007 print"[221]"spc(38)"[221]";
  139. 9008 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]";
  140. 9009 print"[145][145]";spc(20-len(f$(sp))/2);f$(sp);
  141. 9010 lp=1:goto10050
  142. 9020 :
  143. 10000 rem deal with scrolling...
  144. 10010 ifag$=""orj=125thenlp=lp+1
  145. 10020 ifag$="[145]"orj=126thenlp=lp-1
  146. 10030 ifag$="\"thenfl=1:goto10100
  147. 10040 iflp>nl-5thenlp=nl-5
  148. 10045 iflp<1thenlp=1
  149. 10050 forx=217to242:pokex,128orpeek(x):next:printtd$:forx=lptolp+5
  150. 10060 print""t$(x)left$(s$,38-len(t$(x)))
  151. 10070 next
  152. 10100 return
  153. 60000 rem return
  154. 60010 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  155. 60020 ifer<>63thenend
  156. 60025 load"hello connect",8
  157.